package node;

public class MyNode <E> {
    private E data;
    private int id;
    private MyNode next;

    public MyNode(){}
    public MyNode(E data){
        this.data = data;
    }
    public MyNode(int id,E data){
        this.id = id;
        this.data = data;
    }

    public void setId(int id){
        this.id = id;
    }

    public int getId(){
        return id;
    }

    public E getData() {
        return data;
    }

    public void setData(E data) {
        this.data = data;
    }

    public MyNode getNext() {
        return next;
    }

    public void setNext(MyNode next) {
        this.next = next;
    }

    @Override
    public String toString() {
        return "MyNode{" +
                "data=" + data +
                '}';
    }
}
